import React from 'react';
module.exports = [
  {
    key: 'id',
    title: '',
    dataType: 'int',
    primary: true,
    width: 0,
    className: 'disnon-table',
    render: () => {
    }
  },{
    key: 'name',
    title: '名称',
    dataType: 'varchar'
  },
  {
    key: 'accessUrl',
    title: '访问地址',
    dataType: 'varchar'
  },{
    key: 'showAtStr',
    title: '显示时间',
    dataType: 'varchar'
  },{
    key: 'createdAt',
    title: '创建时间',
    dataType: 'varchar',
    render: (text, row, index) => {
      return new Date(text).format("yyyy-MM-dd HH:mm:ss");
    }
  },{
    key: 'thumbnail',
    title: '图片',
    render: (text, record, index) => {
      return (
        <div style={{textAlign: 'center'}}>
            {text? <img src={text} /> : <span style={{color:'#F04134'}}>上传错误,地址不存在</span>}
        </div>
      )
    }
  },{
    key: 'imgUrl',
    title: '操作',
    dataType: 'varchar',
    render: (text) => {
      return <a href={text ? text : 'javascript:;'} target="_blank">查看图片</a>
    }
  },
  
];
